# encoding: utf-8

import json


# Extend the JSONEncoder class
class ExtendEncoder(json.JSONEncoder):
    def default(self, obj):
        if obj == "None":
            return None
        return json.JSONEncoder.default(self, obj)


class ExtendDecoder(json.JSONDecoder):

    def decoder(self, obj):
        if obj == "None":
            return None
        return json.JSONDecoder.decode(self, obj)



origin = '{"key": None}'

# result = json.loads(json.dumps(origin, cls=ExtendEncoder))
# print(result)
b = json.loads(origin, cls=ExtendDecoder)
print(b)

